<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
namespace plugins\matrix\controller; //Demo插件英文名，改成你的插件英文就行了
use cmf\controller\PluginBaseController;
use think\Db;
use think\cache\driver\Redis; //引入redis

class IndexController extends PluginBaseController
{

    function index()
    {
        $redis =new Redis();   //实例化
        $redis->handler()->set('count',1);
        var_dump($redis->handler()->get('count') );

        //$redis->handler()->delete('dati_zAdd');    //清除键值

       // $redis->handler()->zAdd('dati_zAdd',11,‘wbj’);   //有序列表，插入数据
        //$redis->handler()->zRange('dati_zAdd',0,10) ；  //输出前排名前十的   由低到高排序
        //$redis->handler()->ZCARD('dati_zAdd');     //返回总数

        //$redis->handler()->ZSCORE('dati_zAdd','wbj');    //返回指定人的分数

        //$redis->handler()->zIncrBy('dati_zAdd', 1, 'wbj');    //每次增加1
        //$redis->handler()->expire("dati_zAdd", 10);    //设置有效期


        return $this->fetch("/index");
    }

}
